package DTO;
import java.util.ArrayList;


public class AlbumModel implements Album{
	
	ArrayList<PhotoModel> photos;
	private String Title;
	private String Path;
	
	public AlbumModel() {
		this.photos = new ArrayList<PhotoModel>();
	}
	
	public String getTitle() {
		return Title;
	}

	public void setTitle(String title) {
		Title = title;
	}

	public String getPath() {
		return Path;
	}

	public void setPath(String path) {
		Path = path;
	}

	public AlbumModel(String title) {
		this.Title = title;
	}
	
	public ArrayList<PhotoModel> getPhotos() {
		return this.photos;
	}
	
	public ArrayList<String> getImagesPath() {
		ArrayList<String> imagesPath = new ArrayList<String>();
		
		for(PhotoModel photo : this.photos) {
			imagesPath.add(photo.getPath());
		}
		
		return imagesPath;
	}
	
	public PhotoModel getPhoto(int position) {
		return this.photos.get(position);
	}
	
	public boolean hasPhoto() {
		if(this.photos.size() == 0)
			return false;
		
		return true;
	}
	
	public PhotoModel getFirstPhoto() {
		return this.photos.get(0);
	}
	
	public String getTitleWithCount() {
		return this.Title + " (" + this.photos.size() + ")";
	}

	@Override
	public void deleteAlbum() {
		// TODO Auto-generated method stub
		
	}
}
